import PropTypes from 'prop-types' 
 const Child=(props)=>{
    return (<>
        <h1>子组件</h1>
        <div>
            生活费:{props.money}
            <button onClick={()=>{
                props.giveMoney("爸爸：再给我"+300+"元吧")
            }}>再要点</button>
        </div>
    </>)
}
Child.defaultProps={
    money:50
}
Child.propTypes={
    money:PropTypes.number.isRequired
}
export default Child